<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

	protected function _initNamespace() {
   	$loader = Zend_Loader_Autoloader::getInstance();
		$loader->registerNamespace('Xend_');
	}

	protected function _initRouter() {
		$router = new Xend_Controller_Router_Rewrite();
		$ctrl		= Zend_Controller_Front::getInstance();

		$ctrl->addModuleDirectory(APPLICATION_PATH . '/modules/default');
		$ctrl->addModuleDirectory(APPLICATION_PATH . '/modules/system');

		$ctrl->setRouter($router);
	}

	protected function _initDoctype()	{
		$this->bootstrap('view');

		$view = $this->getResource('view');
		$view->doctype('XHTML1_STRICT');
	}

	protected function _initRoute() {
		Zend_Loader::loadFile('route.php', APPLICATION_PATH . '/configs/');
	}

	protected function _initViewHelper() {
		$this->bootstrap('view');

		$view = $this->getResource('view');
		$view->addHelperPath(APPLICATION_PATH . '/views/helpers/', 'View_Helper_');
	}

	protected function _initLocale() {
		$locale = new Zend_Locale('de_De');
		Zend_Registry::set('Zend_Locale', $locale);
	}

	protected function _initGameProperties() {
		$model	= new Application_Model_GameProperties();
		$data		= $model->find(array('game_properties.id = ?' => 1));

		Zend_Registry::set('GameProperties', $data);
	}
}
?>
